
<html lang="UTF-8" xmlns:th="http://www.thymeleaf.org">
<head>
    <title>Title</title>
    <link rel="stylesheet" th:href="@{/webjars/bootstrap/3.3.7/css/bootstrap.css}" type="text/css">
    <script type="text/javascript" th:src="@{/webjars/jquery/3.4.1/jquery.js}"></script>
</head>
<body>


<div class="container">
    <h2 class="text-center">店铺</h2>
    <div class="container text-left" style="margin-top: 50px">
        <form class="form-inline" th:action="@{/selbusiness}" method="post">
            标题查询:
            <input type="text" name="keyword" class="form-control input-group" placeholder="请输入关键字/烧烤"/>
            <button type="submit" class="btn btn-danger">查询</button>
        </form>

    </div>

    <table class="table table-bordered">
        <thead>
        <tr>
            <th>编号</th>
            <th>名称</th>
            <th>地址</th>
            <th>商品</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody th:each="b:${pageInfo.list}">
            <tr>
                <td th:text="${b.id}"></td>
                <td th:text="${b.shjname}"></td>
                <td th:text="${b.shjaddress}"></td>
                <td th:text="${b.shjphone}"></td>
                <td><a th:href="@{/SelectBusinessById(id=${b.id})}" class="btn btn-primary">查看详情</a></td>
            </tr>
        </tbody>
    </table>
    <div class="text-center">
        <ul class="pagination">
            <li th:if="${pageInfo.pageNum!=1}"><a th:href="@{/selbusiness(pageNum=1)}">&laquo;</a></li>
            <li th:each="i:${pageInfo.navigatepageNums}" th:class="${pageInfo.pageNum==i}?'active':''">
                <a th:href="@{/selbusiness(pageNum=${i})}" th:text="${i}"></a>
            </li>
            <li th:if="${pageInfo.pageNum!=pageInfo.pages}"><a
                    th:href="@{/selbusiness(pageNum=${pageInfo.pages})}">&raquo;</a>

            </li>
        </ul>
    </div>
</div>
</body>
</html>
